<template>
	<uv-modal :showConfirmButton="false" ref="modal" width="600rpx" full @close="modalClose">
		<view class="round-20 px-70 py-60 popup_test flex-col flex-center w-full">
			<view class="" style="width:390rpx;height: 260rpx;">
				<uv-image :src="`${imgPath}mine/test_1.svg`" width="390rpx" height="260rpx" />
			</view>
			
			<view class="mt-20 text36 color1a font-weight-600">完成测试</view>
			<view class="text-30 mt-10 mb-50 color6">已生成测试报告，请前往查看</view>
			
			<view class="w-full">
				<fui-button background="#0B9AFF" size="32" color="#fff" borderColor="" @click="emits('confirm')">查看报告</fui-button>
			</view>
		</view>
	</uv-modal>
</template>

<script setup>
	
	import { ref, watch } from 'vue'
	import { imgPath } from '@/common/config'
	
	let prosp = defineProps({
		modelValue: { 
			type: Boolean, 
			default: false
		}
	})
	
	let modal = ref(null)
	
	watch(() => prosp.modelValue, show => {
		show && modal.value?.open()
		!show && modal.value?.close()
	})
	
	let emits = defineEmits(['update:modelValue', 'confirm'])
	function modalClose() {
		uni.navigateBack()
		emits('update:modelValue', false)
	}
	
</script>


<style scoped lang="scss"> 
	.absolute{position: absolute;top: 0;bottom: 0;left: 0;right: 0}
	.modal_centent{height: 560rpx;width: 100%}
	.modal_close{position: absolute;right: 40rpx;top: 52rpx;z-index: 1}
	.modal_tip{color: #4A4A4A}
	.mb{margin-top: 43rpx;margin-bottom: 43rpx}
</style>